﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Admin.CYT369.Com.DAL.Domains.Apps
{
    /// <summary>
    /// 角色与功能菜单的关系
    /// </summary>
    public class RoleMenu: BaseObject<int>
    {
        /// <summary>
        /// 角色ID
        /// </summary>
        public int RoleID { get; set; }

        /// <summary>
        /// 功能菜单 ID
        /// </summary>
        public int MenuID { get; set; }

        /// <summary>
        /// 勾选状态
        /// </summary>
        public int Status { get; set; }

        /// <summary>
        /// 实现一对多的关系
        /// </summary>
        public ICollection<RoleMenuOperation> RoleMenuOperations { get; set; } = new HashSet<RoleMenuOperation>();

    }

    /// <summary>
    /// Role-Menu-Operation三者关联
    /// </summary>
    public class RoleMenuOperation: BaseObject<int>
    {
        public int RoleMenuID { get; set; }

        /// <summary>
        /// 功能菜单ID
        /// </summary>
        public int OperationID { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        public bool Enable { get; set; }

        /// <summary>
        /// 实现一对多的关系
        /// </summary>
        public RoleMenu RoleMenu { get; set; }

    }
}
